<?php
/**
* @version		$Id: router.php 8703 2007-09-02 15:14:45Z manuman $
* @package		Tiro
* @copyright	Copyright (C) 2007 - 2008 Joombaya. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Letterman is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

function LettermanBuildRoute(&$query)
{
	$segments = array();

	if(isset($query['view']))
	{
		$segments[] = $query['view'];
		unset($query['view']);
	};

	if(isset($query['layout']))
	{
		$segments[] = $query['layout'];
		unset($query['layout']);
	};

	if(isset($query['task']))
	{
		$segments[] = $query['task'];
		unset($query['task']);
	};

	return $segments;
}

function LettermanParseRoute($segments)
{
	$vars = array();

	$vars['view']  = $segments[0];
	$vars['layout']    = $segments[1];
	$vars['task']    = $segments[2];
	
	echo "hello";
	print_r($vars);
	return $vars;
}
?>